function loadGameSetting(){
    var db = openDatabaseSync("Lines98DB", "1.0", "Local Lines 98 SQL!", 1000000);
    db.transaction(
        function(tx) {
            var rs = tx.executeSql('SELECT * FROM SavedSettings');
            console.debug(rs.rows.length)
            if (rs.rows.length>0){
                backgroundVolume = rs.rows.item(0).backgroundVolume;
                soundVolume = rs.rows.item(0).soundVolume;
                console.debug(rs.rows.item(0).backgroundVolume+","+rs.rows.item(0).soundVolume);
            }
            else{
                backgroundVolume = 0.25;
                soundVolume = 0.25;
            }
        }
    )
}
function saveGameSettings(){
    var db = openDatabaseSync("Lines98DB", "1.0", "Local Lines 98 SQL!", 1000000);
    db.transaction(
                function(tx) {
                    tx.executeSql('CREATE TABLE IF NOT EXISTS SavedSettings(id NUMBER, backgroundVolume REAL,soundVolume REAL)');
                    tx.executeSql('DELETE FROM SavedSettings');
                    tx.executeSql('INSERT OR REPLACE INTO SavedSettings VALUES (0, ?, ?)', [backgroundVolume, soundVolume]);
                    console.debug(backgroundVolume+','+soundVolume);
                }
          )
}
